//
//  MapScreen.h
//  FruitCrush
//
//  Created by gaoyu on 15/7/6.
//
//

#ifndef __FruitCrush__MapScreen__
#define __FruitCrush__MapScreen__

#include "cocos2d.h"
#include "OptionMenuView.h"
#include "UpMenuView.h"
#include "ShowGoldView.h"

USING_NS_CC;

class MapScreen : public cocos2d::Layer
{
public:
    MapScreen();
    static cocos2d::Scene* createScene();
    CREATE_FUNC(MapScreen);
    virtual bool init() override;
    virtual void onEnter() override;
    virtual bool onTouchBegan(Touch *touch, Event *unused) override;
    virtual void onTouchMoved(Touch *touch, Event *unused) override;
    virtual void onTouchEnded(Touch *touch, Event *unused) override;
    
private:
    OptionMenuView *optionMenuView;
    UpMenuView *upMenuView;
    ShowGoldView *goldView;
    Menu* mapBollMenu;
    Menu* mapExtendMenu;
    float    m_beginPY;
    void bgInit();
    void menuInit();
    void extendMenuInit();
    void extendMenuCallback(Ref *sender);
    void doExtendSelectedItem(int tag);
    void menuCallback(Ref *sender);
    void doSelectedItem(int tag);
    void optionMenuViewInit();
    void upMenuInit();
    void goldMenuInit();
};

#endif /* defined(__FruitCrush__MapScreen__) */
